int lectura = 0; 
int umbral= 700;

void setup() {   
    pinMode(3, OUTPUT);
}

void loop() {     
  lectura = analogRead(2);    
  if (lectura > umbral) {
        analogWrite(3, lectura/4);
  } else {
        digitalWrite(3, LOW);
  }
}












 




